import request from "@/utils/request";

// 查询文章列表
export function listArticle(query) {
  return request({
    url: "/un/article/list",
    method: "get",
    params: query,
  });
}

// 查询文章详细
export function getArticle(aId) {
  return request({
    url: "/un/article/" + aId,
    method: "get",
  });
}

// 新增文章
export function addArticle(data) {
  return request({
    url: "/un/article/add",
    method: "post",
    data: data,
  });
}

// 修改文章
export function updateArticle(data) {
  return request({
    url: "/un/article/edit",
    method: "post",
    data: data,
  });
}

// 删除文章
export function delArticle(aId) {
  return request({
    url: "/un/article/" + aId,
    method: "delete",
  });
}
//提交审核
export function submitAdmin(data) {
  return request({
    url: "/un/article/submitaudit",
    method: "post",
    data: data,
  });
}
//发布
export function submitRelease(data) {
  return request({
    url: "/un/article/release",
    method: "post",
    data: data,
  });
}
